Group Dataset
Group Dataset [Stash Dataset]: This video contains how group dataset functionality works in OPNBI.
This document contains information about Group dataset functionality and its use case information.
This document has step-by-step information on how to use the Group dataset and will show one use case example.
Use Case: Group dataset will be used in a scenario where data coming from a dataset is very large and it takes a huge amount of time to refresh the data. This happens when your dataset has a parameter and we are passing values in this parameter from the dashboard using filters. What happens here is when a filter is applied from dashboard, this filter value is passed inside this dataset parameter and query written in a dataset is called on database. This process takes more time if response data is very big. In this scenario Group, dataset is used.
Now, how the group dataset will resolve this limitation will be the obvious question. In order to make a group dataset, one will need dataset of all possible unique parameter values that can be applied through filters. This group dataset will select one parameter value from dataset at a time, pass it to query parameter, and generate [.CDS] output. This is performed for all parameters available in dataset. Once finished, all dataset files generated will be grouped inside one dataset whose extension is (groupreport_name.stash) file. Inside this stash, output for each and every parameter is stored. And now when we use this stash dataset in dashboard and apply parameter values through filters, it will not request database for the result but return stored response instead. And this is how group dataset plays a role to increase the performance of dashboard.
Prerequisites: Orders details.ds (Dataset having a unique value of order number), orders.ds (dataset has order information and has a parameter to pass order number)
Example Description: We are demonstrating a group dataset using orders.ds dataset. This dataset contains all order-related information which displays order information based on order number parameters. Also, we have created dataset order details. ds which has unique values of all order numbers.
NOTE: WE CAN USE A GROUP DATASET IN A CONDITION WHERE DATABASE TABLES ARE NOT CHANGING FREQUENTLY. IF TABLES ARE UPDATED WITHIN A PERIOD OF 30 MIN, IT IS NOT SUGGESTED TO GO WITH A GROUP DATASET.
Here are the steps to create a Group dataset in OPNBI,
Click on Hamburger Icon.
Click on Master Data and Select Group Dataset, as shown in the figure below:
Select a dataset which is having all order number details. i.e., which contains a list of parameters that can be passed. Select Dataset, as shown in the figure below:
- Dataset: Order details.
Click on the Next Button.
There are Two Scenarios in Select Group Dataset.
In the First Scenario report runs with all the columns without Filter.
In Second Scenario report runs with some additional filters.
First Scenario: 8. Enter the following details in Select Grouped Dataset.
- Group Column: OrderNumber (Select Unique value column)
- Dataset: Orders (Select the Parameter dataset which contains OrderNumber Parameter)
- Default value: 10100 (Enter the value which you want to save as default value, it is optional)
- Column to link: OrderNumber (Select the Column which you want to link with Order Dataset)
Fill above details, as shown in the figure below:
Click on the Next Button.
Enter the following details in the Schedule.(You run this group dataset with different scheduling options available here in the schedule window)
- Frequency: Right Now
Click on the Next Button.
Enter the following details in Output.
- Name: Stash Order Details
- Suffix: yyyyddMM_HH-mm-ss (Not mandatory)
- Format: Stash
- Path: Keep it default or you can change it as per your requirement.
Fill above details, as shown in figure below:
Click on the Run button.
You can see the report Schedule Successfully, as shown in the figure below:
To check this request status, Go to the Request Tab in the Request section.
Search for group report name, click on it, here you can see the details of the Stash order details request, as shown in the figure below:
Click on Master Data and select the Dataset to check group DS is created at a specified location or not.
In Dataset Go to the folder you have specified, here you can see the Stash Order Details Dataset, as shown in figure below:
To check data, Double click on the Stash Order Details Dataset, it will display the following page, As shown in figure below:
Now, go to the Parameter tab, it will display following screen.
Enter the following details in Parameter Page. (It should be a valid parameter value) OrderNumber: 10100
Click on the preview Page it will show you output as shown in figure below: Second Scenario: It will run the report with filter column.
In Second Scenario we are adding filter. Apart from dataset parameter, we can apply additional filters on the dataset columns.
For example, we want to filter this dataset with product line ,Enter the following details in Select Group Dataset.
- Additional Filter: select Productline
Click on + icon so filter will be added, as shown in figure below:
Click on Next button and Schedule and Run the Report.
Now go to the dataset folder and double click on the stash dataset which you are created, it will display the following screen:
Now go to the Parameter Tab and enter following details.
- Give the OrderNumber : 10100
Go to the Preview Tab.
Give the name of Productline: Vintage cars, it will display the following screen.
Click on Submit, it will display the following Output.